home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
DJLSR106.ARJ
/
SCREEN2.S
< prev
next >
Wrap
Text File
|
1992-03-29
|
2KB
|
91 lines
/* This is file SCREEN2.S */
/*
** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
**
** This file is distributed under the terms listed in the document
** "copying.dj", available from DJ Delorie at the address above.
** A copy of "copying.dj" should accompany this file; if not, a copy
** should be available from where this file was obtained. This file
** may not be distributed without a verbatim copy of "copying.dj".
**
** This file is distributed WITHOUT ANY WARRANTY; without even the implied
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**
** Modified by J. Alan Eldridge, Liberty Brokerage, 77 Water St, NYC 10005
**
** added global char ScreenAttrib -- this is the attribute
** used by ScreenClear(): it defaults to 0x07 so as not to
** break existing code.
**
*/
.data
.globl _ScreenAttrib
_ScreenAttrib:
.byte 0x07
_ScreenPrimary = 0xe01b8000
_ScreenSecondary = 0xe01b0000
.globl _ScreenPrimary
.globl _ScreenSecondary
.text
.globl _ScreenSetCursor /* row, col */
_ScreenSetCursor:
pushl %ebp
movl %esp,%ebp
pushl %ebx
pushl %esi
pushl %edi
movb $0x02,%ah
movb $0,%bh
movb 8(%ebp),%dh
movb 12(%ebp),%dl
int $0x10
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
.globl _ScreenGetCursor /* &row, &col */
_ScreenGetCursor:
pushl %ebp
movl %esp,%ebp
pushl %ebx
pushl %esi
pushl %edi
movb $0x03,%ah
movb $0,%bh
pushl %ebp
int $0x10
popl %ebp
movl 8(%ebp),%esi
movzbl %dh,%eax
movl %eax,(%esi)
movl 12(%ebp),%esi
movzbl %dl,%eax
movl %eax,(%esi)
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
.globl _ScreenClear
_ScreenClear:
pushl %edi
movl $0xe0000400,%edi
movzwl 0xe000044a,%ecx
movzbl 0xe0000484,%eax
imull %eax,%ecx
movl $0xe01b8000,%edi
movb $0x20,%al
movb _ScreenAttrib,%ah
rep
stosw
popl %edi
ret